﻿
<section id="title">
    @if (Model.MainState == EditState.Preview)
    {
        <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Buttons.RevokeButton Url="@("/entries/EditMain/" + Model.Id)" ExamineType="Operation.EstablishMain" OnClickRevoke="OnRevoke"  Class="m-0"/>
    }

    @if (string.IsNullOrWhiteSpace(Model.MainPicture) == false)
    {
        <img class="main-img @(Model.Type== EntryType.Role||Model.Type== EntryType.Staff?"no-limit":"")" src="@Model.MainPicture" alt="@Model.Name" />
    }
    else
    {
        @if (string.IsNullOrWhiteSpace(Model.Thumbnail) == false)
        {
            <img class="thum-img" src="@Model.Thumbnail" alt="@Model.Name" />
        }
    }


    <h1>@Model.Name</h1>
    @if (string.IsNullOrWhiteSpace(Model.BriefIntroduction) == false)
    {
        <div class="description">
            @Model.BriefIntroduction
        </div>
    }

</section>

@code {
    [Parameter]
    public EntryIndexViewModel Model { get; set; }
    [Parameter]
    public EventCallback<Operation> OnRevoke { get; set; }
}
